package com.lease.web.admin.custom.config;

import com.lease.web.admin.custom.converter.StringToBaseEnumConverterFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class WebMvcConfiguration implements WebMvcConfigurer {

    @Override
    public void addFormatters(FormatterRegistry registry) {
        //添加converter即可
        registry.addConverterFactory(new StringToBaseEnumConverterFactory());
    }
}
